class MenuItem
  attr_accessor :active
  attr_accessor :name
  attr_accessor :link
  attr_accessor :roles
  attr_writer :submenu
  
  def initialize active, name='', link='', submenu = [], roles=[]
    @active = active
    @name = name
    @link = link
    @submenu = submenu
    @roles = roles
  end

    
#  def initialize name='', link='', roless=[], submenuu=[]
#    @name = name
#    @link = link
#    @roles = roless
#    @submenu = submenuu
#  end
  
  def roles
    return  @roles = Array.new if @roles.nil?
    @roles
  end
  
  
  def submenu
    return  @submenu = Array.new if @submenu.nil?
    @submenu
  end
 
end